{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "source": [
    "var = 123\r\n",
    "\r\n",
    "def log(func):\r\n",
    "    def wrapper(*args, **kw):\r\n",
    "        print(\"[LOG] Function Clling: %s()\" %func.__name__)\r\n",
    "        return func(*args, **kw)\r\n",
    "    return wrapper\r\n",
    "\r\n",
    "\r\n",
    "@log\r\n",
    "def compute_func():\r\n",
    "    print(\"Processing...\")\r\n",
    "\r\n",
    "compute_func()"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "source": [
    "def log(func):\r\n",
    "    print(\"[LOG] Function Clling: %s()\" %func.__name__)\r\n",
    "    return func()\r\n",
    "\r\n",
    "\r\n",
    "@log\r\n",
    "def compute_func():\r\n",
    "    print(\"Processing...\")\r\n"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "source": [
    "import numpy\r\n",
    "from dependency import arr_info\r\n",
    "\r\n",
    "array = numpy.array([[1,2,3],[4,5,6]])\r\n",
    "elem = numpy.array([0])\r\n",
    "arr_list = [array, elem, 123, \"ABC\"]\r\n",
    "\r\n",
    "arr_info(array)\r\n",
    "arr_info(*arr_list)"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "【1】\n",
      " 多维数组（ndarray）:\n",
      " [[1 2 3]\n",
      " [4 5 6]]\n",
      " 数组维数（ndim）: 2\n",
      " 维度元组（shape）: (2, 3)\n",
      " 数据类型（dtype）: int32\n",
      "【1】\n",
      " 多维数组（ndarray）:\n",
      " [[1 2 3]\n",
      " [4 5 6]]\n",
      " 数组维数（ndim）: 2\n",
      " 维度元组（shape）: (2, 3)\n",
      " 数据类型（dtype）: int32\n",
      "【2】\n",
      " 多维数组（ndarray）:\n",
      " [0]\n",
      " 数组维数（ndim）: 1\n",
      " 维度元组（shape）: (1,)\n",
      " 数据类型（dtype）: int32\n",
      "【3】\n",
      " 类 型: <class 'int'>\n",
      "123\n",
      "【4】\n",
      " 类 型: <class 'str'>\n",
      "ABC\n"
     ]
    }
   ],
   "metadata": {}
  }
 ],
 "metadata": {
  "orig_nbformat": 4,
  "language_info": {
   "name": "python",
   "version": "3.9.6",
   "mimetype": "text/x-python",
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "pygments_lexer": "ipython3",
   "nbconvert_exporter": "python",
   "file_extension": ".py"
  },
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3.9.6 64-bit ('venv': venv)"
  },
  "interpreter": {
   "hash": "2df30c634058628fc5df5036be3dee25b811a252316c0aa1ff7f50eb8aecb5be"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}